<?php

use yii\helpers\Html;
use kartik\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\shop\models\ShopDispatchSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '配送方式';
$this->params['breadcrumbs'][] = $this->title;
?>


<section class="wrapper site-min-height">
    <!-- page start-->
    <section class="panel">
        <header class="panel-heading">
              <?= Html::a('返回','javascript:history.back(-1)'); ?>  <?= Html::encode($this->title) ?>
        </header>
        <div class="panel-body">
            <div class="adv-table editable-table ">
 


<div class="shop-dispatch-index">

    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <p>
        <?= Html::a('添加配送方式', ['create'], ['class' => 'btn btn-success']) ?>
    </p>

    <?= GridView::widget([
        'dataProvider'=>$dataProvider,
        'filterModel'=>$searchModel,
        'showPageSummary'=>true,
        'pjax'=>true,
        'striped'=>true,
        'hover'=>true,
        'panel'=>['type'=>'primary', 'heading'=>' 配送方式管理'],
        'containerOptions'=>['style'=>'overflow: auto'], // only set when $responsive = false
        'headerRowOptions'=>['class'=>'kartik-sheet-style'],
        'filterRowOptions'=>['class'=>'kartik-sheet-style'],
        'columns'=>[
            [
                'attribute'=>'id',
                'pageSummaryOptions'=>['class'=>'text-right text-warning'],
                'width'=>'100px',
            ],[
                'attribute'=>'dispatchname',
                'pageSummaryOptions'=>['class'=>'text-right text-warning'],
                'width'=>'100px',
            ],
            [
                'attribute'=>'dispatchtype',
                'pageSummaryOptions'=>['class'=>'text-right text-warning'],
                'width'=>'100px',
            ],
            [
                'attribute'=>'displayorder',
                'pageSummaryOptions'=>['class'=>'text-right text-warning'],
                'width'=>'100px',
                'format'=>['decimal', 0],
                'pageSummary'=>true
            ],
            [
                'attribute'=>'firstprice',
                'pageSummaryOptions'=>['class'=>'text-right text-warning'],
                'width'=>'100px',
                'format'=>['decimal', 0],
                'pageSummary'=>true
            ],
            [
                'attribute'=>'secondprice',
                'width'=>'150px',
                'hAlign'=>'right',
                'format'=>['decimal', 0],
                'pageSummary'=>true
            ],

            [
                'attribute'=>'firstweight',
                'width'=>'150px',
                'hAlign'=>'right',
            ],
            [
                'attribute'=>'secondweight',
                'width'=>'150px',
                'hAlign'=>'right',
            ],
            [
                'class' => '\kartik\grid\ActionColumn',
                'deleteOptions' => ['label' => '<i class="glyphicon glyphicon-remove"></i>']
            ],
        ],
        'toolbar'=> [
            Yii::$app->request->get('id') !== null?[
                'content' => Html::button('<i class="glyphicon glyphicon-plus"></i>', ['type'=>'button', 'title'=>'选中归为档案', 'class'=>'btn btn-success', 'id'=>'addpig'])
            ]:'',
            '{export}',
            '{toggleData}',
        ],
        'bordered'=>true,
        'condensed'=>true,
    ]);
    ?>
</div>
</div>
</div>
</section>
</section>





